import {post} from '@/common/request';
import {requestParams, urlApiClientContent, urlPublicContent} from './ServerService';

const appAuditionUrl = urlPublicContent + 'appAudition/';
const homeUrl = urlPublicContent + 'home/';
const practiceUrl = urlApiClientContent + 'practice/';
const HomeUrl = urlPublicContent + 'onHomeImage/'

/**
 * 查公开在线练测
 * @returns {Promise | Promise<unknown>}
 */
export function listBzPublicPractice() {
    return post(homeUrl +  requestParams('listBzPublicPractice', {}), null);
}

/**
 * 知识速递
 * @param pageNo
 * @param pageSize
 * @returns {Promise | Promise<unknown>}
 */
export function getHomeAudition({pageNo, pageSize}) {
    return post(appAuditionUrl +  requestParams('getHomeAudition', {pageNo, pageSize}), null);
}

/**
 * 知识速递
 * @param queryType
 * @param queryKey
 * @param pageNo
 * @param pageSize
 * @returns {Promise | Promise<unknown>}
 */
export function pageBzPractice({queryType, queryKey, pageNo, pageSize,done}) {
    return post(practiceUrl +  requestParams('pageBzPractice', {queryType, queryKey, pageNo, pageSize,done}), null);
}
